package com.twang.stock.task.old;

import com.twang.stock.redis.RedisUtil;
import com.twang.stock.service.jinyan.HolidayService;
import com.twang.stock.utils.date.HolidayCopy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BaseTask {
    @Autowired
    private HolidayService holidayService;
    @Autowired
    private RedisUtil redisUtil;

    public Boolean isWork() {
        return holidayService.isWorkDay(HolidayCopy.getRealToday()) ;
    }

    public Boolean isWorkTradeTime(){
       if(holidayService.isWorkDay(HolidayCopy.getRealToday())){
            return  holidayService.isWork();
        }else{
           return Boolean.FALSE;
       }
    }

}
